﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Libs.HR;

public partial class Pages_Hr_ContractType_Add : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        AppUtils.CheckLogin();
        Title = Title + " - Thêm mới loại hợp đồng";
    }

    protected void btAdd_Click(object sender, EventArgs e)
    {
        var _ContractType = new ContractType();
        _ContractType.Name = txtName.Text.Trim();
        _ContractType.ShortName = txtShortName.Text.Trim();
        _ContractType.Order = Convert.ToInt32(txtOrder.Text);
        _ContractType.Add();

        Response.Redirect(Constant.ADMIN_PATH + Resources.Url.ContractTypeList);
    }

    protected void btCancel_Click(object sender, EventArgs e)
    {
        Response.Redirect(Constant.ADMIN_PATH + Resources.Url.ContractTypeList);
    }
}
